<?php
################################################################################
#
# SCRIPT DE EXIBICAO DO MENU POP-DOWN
# Empresa: Prodepi
# Author: James Cleyton
# Nome: menupop.php
#
################################################################################

if (eregi("menupop.php",$_SERVER['PHP_SELF'])) {
   Header("Location: index.php");
   die();
}
?>
<script>
/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout)
*************************************/
var oCMenu;
Cria_Menu();
<?
$aux = Monta_Menu($sql);
foreach($aux as $val) {
  echo "oCMenu.makeMenu($val)\n";
}
?>
//Leave this line - it constructs the menu
oCMenu.construct()

function Sair(lnk) {
  if (confirm ("Sair do Sistema...continua?")) {
     window.location.href=lnk;
  }
}
</script>
